<%@ page import="com.imu.wys.model.User" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<html>
<body>
<h2>欢迎访问！！  <a href="login.jsp"> 前往登录</a></h2>

<%
    //response.sendRedirect("login.jsp");
%>
<%
    //ServletContext context
    //getServletContext().getAttribute("onlineUsers")
    ServletContext context = session.getServletContext();
    int onlineUsers = (Integer)context.getAttribute("onlineUsers")-1;
%>

当前系统访问人数为：<span style="font-size: 30px"> <%=onlineUsers%>  </span>

</body>
</html>